<template>
  <div class="footer-item">
    <van-tabbar-item :to="'/' + index">
      <span v-text="title"></span>
      <template #icon>
        <img :src="imgSrc"/>
      </template>
    </van-tabbar-item>
  </div>
</template>

<script>
  export default {
    name: "footerItem",
    props: {
      title: {type: String, default: ''},     // 标题
      index: {type: String, default: ''},     // 路由
      imgSrc: {type: String, default: ''},    // 图片地址
    }
  }
</script>

<style lang="less" scoped>
  .footer-item {
    flex: 1;
    display: flex;
    align-items: center;
    height: 98px;
  }
</style>
